//
//  FPTrailerTableViewCell.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/18.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPTrailerTableViewCell.h"

@implementation FPTrailerTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self B_TableViewCell];
    }
    return self;
}

- (void)B_TableViewCell
{
    // 创建视频缩略图
    self.videoImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kImageW(15), kImageH(15), kImageW((kScreenWidth - kImageW(15))/2 - 30), kImageH(80))];
//    self.videoImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_videoImageView];
    
    // 视频缩略图上的播放图标
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(((kScreenWidth - kImageW(15))/2 - 65), kImageH(45), kImageW(30), kImageH(30))];
    imageView.image = [UIImage imageNamed:@"cm2_rcd_btn_play_prs@3x"];
    [self.videoImageView addSubview:imageView];
    
    // 预告片名字
    self.filmNameLabel = [[UILabel alloc] initWithFrame:CGRectMake(((kScreenWidth - kImageW(15))/2 ), kImageH(15), ((kScreenWidth - kImageW(15)/2) - 185), kImageH(60))];
//    self.filmNameLabel.backgroundColor = [UIColor redColor];
    self.filmNameLabel.numberOfLines = 0;
    [self.contentView addSubview:_filmNameLabel];
    
    // 影片时长
    self.filmTimeLabel = [[UILabel alloc] initWithFrame:CGRectMake(((kScreenWidth - kImageW(15))/2 ), kImageH(80), ((kScreenWidth - kImageW(15)/2) - 200), kImageH(15))];
//    self.filmTimeLabel.backgroundColor = [UIColor purpleColor];
    self.filmTimeLabel.textColor = [UIColor lightGrayColor];
    self.filmTimeLabel.font = [UIFont systemFontOfSize:12.0];
    [self.contentView addSubview:_filmTimeLabel];
    
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, kImageH(109), kScreenWidth, 1)];
    view.backgroundColor = [UIColor lightGrayColor];
    [self.contentView addSubview:view];
}

/*
 UIImageView *videoImageView; // 播放视图图片
 UILabel *filmNameLabel;// 预告片名字
 UILabel *filmTimeLabel;// 预告片简介
 */
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
